<%--
  Created by IntelliJ IDEA.
  User: 18902
  Date: 2020/10/17
  Time: 20:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
    <title>登录页面</title>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    <link href="${pageContext.request.contextPath}/css/style.css"
          type=text/css rel=stylesheet>
    <link href="${pageContext.request.contextPath}/css/boot-crm.css"
          type=text/css rel=stylesheet>
    <script src=
                    "${pageContext.request.contextPath}/js/jquery-1.11.3.min.js">
    </script>
    <meta content="MSHTML 6.00.2600.0" name=GENERATOR>
<body class="loginbg">
<div ALIGN="center">
    <table align="center"
           id="table1">
        <tr>
            <td height="155"></td>
            <td></td>
        </tr>
        <tr>
            </td>
            <td class="login_msg" width="600" align="center">
                <!-- margin:0px auto; 控制当前标签居中 -->
                <fieldset style="width: auto; margin: 0px auto;">
                    <legend align="center">
                        <font style="font-size:33px" face="宋体">
                            欢迎使用宿舍管理系统
                        </font>
                    </legend>
                    <font color="red" style="font-size: 18px">
                        <%-- 提示信息--%>
                        <span id="message">${msg}</span>
                    </font>
                    <%-- 提交后的位置：/WEB-INF/jsp/customer.jsp--%>
                    <form name="form1" action="${pageContext.request.contextPath}/login"
                          method="post" onsubmit="return check()">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/><br/>

                        <h2>账户:<input type="text" name="useracount"><br/></h2>
                        <h2>密码:<input type="password" name="password"><br/><br/><br/></h2>

                        <font color="#f0f8ff"><input type="submit" name="sub_login" value="学生登录"
                                                     style="width: 100px;height: 33px;background-color: #9be;font-size: 16px"></font>
                        <font color="#f0f8ff"><input type="submit" name="sub_login" value="宿管登录"
                                                     style="width: 100px;height: 33px;background-color: #9be;font-size: 16px"></font>
                        <font color="#f0f8ff"><input type="submit" name="sub_login" value="管理员登录"
                                                     style="width: 100px;height: 33px;background-color: #9be;font-size: 16px"></font>
                        <font color="#f0f8ff"><input type="reset" name="reset" value="重置"
                                                     style="width: 100px;height: 33px;background-color: #9be;font-size: 16px"></font>
                        <br/>
                    </form>
                </fieldset>
            </td>
        </tr>
    </table>
</div>
<script type="text/javascript">
    function check() {
        var useracount = form1.useracount.val();
        var password = form1.password.val();
        if ((useracount == "") || useracount == null) {
            alert("请输入账号！")
            form1.useracount.focus();
            return;
        } else if ((password == "") || (password == null)) {
            alert("请输入密码！")
            form1.password.focus();
            return;
        } else {
            form1.submit();
        }
    }
</script>
</body>
</html>
